const order_stg_cdh = "# -*- coding: utf-8 -*-\n" +
    "from stcquant.api.strategy_mode import strategy_mode\n" +
    "\n" +
    "class strategy(strategy_mode):\n" +
    "        \n" +
    "    def init(self):\n" +
    "        self.quote_count = 0\n" +
    "        self.symbol = '200205.IB'\n" +
    "        self.gw = 'cdh'\n" +
    "        self.count = 0\n" +
    "        \n" +
    "        self.deal = 0\n" +
    "        self.min = 0\n" +
    "        self.day = 0\n" +
    "        self.subscribe([self.symbol], self.gw, ['tick'])\n" +
    "        #self.subscribe(['200250.IB'], 'odm', ['tick','deal', 'min', 'day'])\n" +
    "        \n" +
    "    #行情回报\n" +
    "    #--------------------------------------------------------------------------     \n" +
    "    def on_tick(self, data):\n" +
    "        self.count += 1\n" +
    "        if self.count % 100 == 0:\n" +
    "            self.order = self.send_order('1','2','','',self.symbol, 2000, 2.5)\n" +
    "            \n" +
    "    def on_md(self, data):\n" +
    "        pass\n" +
    "                \n" +
    "    #行情回报\n" +
    "    #--------------------------------------------------------------------------     \n" +
    "    def on_deal(self, data):\n" +
    "        if self.deal == 0: \n" +
    "            self.deal += 1\n" +
    "        \n" +
    "    #行情回报\n" +
    "    #--------------------------------------------------------------------------     \n" +
    "    def on_bar(self, data):\n" +
    "        if data['type'] == 'min_bar' and self.min == 0: \n" +
    "            self.min += 1\n" +
    "        if data['type'] == 'day_bar' and self.day == 0: \n" +
    "            self.day += 1        \n" +
    "            \n" +
    "    #报单回报\n" +
    "    #--------------------------------------------------------------------------        \n" +
    "    def on_order(self, data):\n" +
    "        pass\n" +
    "        \n" +
    "    #成交回报\n" +
    "    #--------------------------------------------------------------------------          \n" +
    "    def on_trade(self, data):\n" +
    "        pass\n" +
    "        \n" +
    "    #持仓回报\n" +
    "    #--------------------------------------------------------------------------          \n" +
    "    def on_position(self, data):\n" +
    "        pass\n" +
    "        \n" +
    "    #参数回报\n" +
    "    #--------------------------------------------------------------------------          \n" +
    "    def on_param(self, data):\n" +
    "        pass\n" +
    "        \n" +
    "    #定时器\n" +
    "    def hello(self):\n" +
    "        self.set_indicator('1','1','1')\n" +
    "            \n" +
    "if __name__ == '__main__':\n" +
    "    # 如何开始运行策略\n" +
    "    main = strategy()"
